public class Equipment 
{
	public final static Item[] Item_List = {new Item("Oxen", 0, 4000), new Item("Food", 5, 100), new Item("Clothing", 2, 1000), new Item("Ammunition", 3, 200), new Item("Wagon Wheel", 75, 1000), new Item("Wagon Axle", 125, 1000), new Item("Wagon Tongue", 100, 1000)};
	private int[] quantities;
	private int weight;
	public final static int MAX_WEIGHT = 3500;
	
	/**
	 * Constructor for the Equipment class. Initializes the user's list of items and weight variable.
	 */
	public Equipment()
	{
		quantities = new int[7];
		weight = 0;
	}
	
	/**
	 * Adds the items specified to the user's list of items. Makes a call to adjustWeight() to adjust the total weight of the equipment.
	 * @param itemlist User's equipment's quantities are increased by the amount in this list (Equipment[i] += itemlist[i], 0<=i<7)
	 */
	public void addItems(int[] itemlist)
	{
		for(int i = 0; i < itemlist.length; i++)
			quantities[i] += itemlist[i];
		
		adjustWeight();
	}

	/**
	 * Accessor for the weight class.
	 * @return int value of the weight variable
	 */
	public int getWeight()
	{
		return weight;
	}
	
	/**
	 * Accessor for the quantities class.
	 * @return array holding the number of items in the user's inventory
	 */
	public int[] getQuantities()
	{
		return quantities;
	}
	
	/**
	 * Reset's the weight field using the current quantities array.
	 */
	private void adjustWeight()
	{
		weight = 0;
		for(int i = 0; i < quantities.length; i++)
			weight += Item_List[i].getWeight() * quantities[i]; 
	}
}
